package com.chance.cc.crawler.development.command.publish.wangyi;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.wangyi.health.realtime.WYHealthRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.wangyi.health.trace.WYHealthTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.script.wangyi.WYPublishScript;
import com.chance.cc.crawler.development.command.trigger.domain.wangyi.WYCrawlerTriggerInfo;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-02-08 17:36:56
 * @email okprog@sina.com
 */
public class PublishWYHealthCrawlerJob {
    /**
     * 网易测试发布
     */
    @Test
    public void publishTestCrawlerJob(){
//        CrawlerJob crawlerJob = WYHealthTraceCrawlerSchedulerJob.publishWYHealthCrawlerScheduleJobInfo();
//        WYCrawlerTriggerInfo.publishWYTestCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(), crawlerJob.generateCrawlerTriggerKey());
        WYPublishScript.publishCrawlerNodeScript();
    }

    /**
     * 网易健康资讯实时发布任务
     */
    @Test
    public void publishWYHealthRealtimeJob(){
        CrawlerJob crawlerJob = WYHealthRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        WYCrawlerTriggerInfo.publishWYHealthCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 网易健康资讯回溯发布任务
     */
    @Test
    public void publishWYHealthTraceJob(){
        CrawlerJob crawlerJob = WYHealthTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        WYCrawlerTriggerInfo.publishWYHealthTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
}
